// 答案在下面
setImmediate(() => {
    console.log(1)
  }, 0)
  setTimeout(() => {
    console.log(2)
  }, 0)
  new Promise((resolve) => {
    console.log(3)
    resolve()
    console.log(4)
  }).then(() => {
    console.log(5)
  })
  async function test() { // 浏览器将 await的执行时间提前了  await xxx 当同步代码执行 
    const a = await 9 // await将下一行及所有的代码都挤入微任务队列
    console.log(a)
    const b = await new Promise((resolve) => {
      resolve(10)
    })
    console.log(b)
  }
  test()
  console.log(6)
  process.nextTick(() => { // 微任务中提前
    console.log(7)
  })
  console.log(8)
  //  3 4 6 8 7 5 9 10 2 1